import 'dart:ui';
import 'package:flutter/material.dart';

///
/// 盒子
///
class Sizes extends SizedBox {
  const Sizes({Key? key}) : super(key: key);

  /// 盒子宽度
  // static Widget boxW(double width) {
  //   return SizedBox(
  //     width: ScreenUtil().setWidth(width),
  //   );
  // }

  /// 盒子高度
  // static Widget boxH(double height) {
  //   return SizedBox(
  //     height: ScreenUtil().setWidth(height),
  //   );
  // }

  /// 获appbar+状态栏高度
  static double getAppBarAndStatusHeight() {
    return kToolbarHeight + MediaQueryData.fromWindow(window).padding.top;
  }

  /// 获状态栏高度
  static double getStatusBarHeight() {
    return MediaQueryData.fromWindow(window).padding.top;
  }

  /// 屏幕宽度
  static double getScreenWidth(BuildContext context) {
    return MediaQuery.of(context).size.width;
  }

  /// 屏幕高度
  static double getScreenHeight(BuildContext context) {
    return MediaQuery.of(context).size.height;

  }

}
